﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ms_page.master" AutoEventWireup="true" CodeFile="DetailDocument.aspx.cs" Inherits="DetailDocument" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script src="Scripts/wz_tooltip.js" type="text/javascript"></script>
       <!-- BEGIN ===== ADD/EDIT Item - SEARCH PANEL -->
<div id="profile_frame" style="width:100%"><!-- thong tin lien he -->
<asp:Panel runat="server" ID="SearchPanel">
    <div>
        <span style="color:Red"><asp:Label ID="lbThongBao" runat="server"></asp:Label></span>
    </div>
     <h5>Danh sách tài liệu</h5>
    <fieldset>
       
        <legend>
            <span class="title">Tìm kiếm</span>
        </legend>
        <div style="text-align:left" id="ANdiv" class="title">
        </div>
    </fieldset>
    <br />
    <fieldset>
        <legend>
            <span>Danh sách</span>
        </legend>
        <div id="gvrd" align="center" style="margin-top:10px; width:100%" >
            <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" BackColor="White" 
                BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" 
                CellSpacing="1" EnableModelValidation="True" GridLines="None" 
                AllowPaging="True" Width="100%" 
                onpageindexchanging="grid_PageIndexChanging" PageSize="100" >
                <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                <HeaderStyle CssClass="thead"  Font-Bold="True" ForeColor="White"  Font-Size="12px" />
                  <Columns>
                    <asp:TemplateField HeaderText="Mã tài liệu" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                          <%--   <a href='UploadDocument.aspx?WId=<%# Eval("Id")%>'><%# Eval("Id")%></a>--%>
                          <%# Eval("Id")%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="center" Width="80px" ForeColor="Black" />
                    </asp:TemplateField>
                      <asp:TemplateField HeaderText="Tên tài liệu" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                             <%#Eval("WorkName")%>
                        </ItemTemplate>
                          <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="left" Width="200px" CssClass="Grid_Row" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày gửi" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                             <%# String.Format("{0: dd/MM/yyyy hh:mm:ss}", Eval("CreateDate"))%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Người làm" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                             <%#Eval("Author")%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tài liệu đính kèm" HeaderStyle-HorizontalAlign="Center">
                         <ItemTemplate>
                             <a onmouseover="Tip('DOWNLOAD TÀI LIỆU ĐÍNH KÈM')" onmouseout='UnTip()' href='<%#Eval("LinkDocument") %>'><%# GetDocuMentName(Eval("LinkDocument").ToString())%></a>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                      <asp:TemplateField HeaderText="Trạng thái" HeaderStyle-HorizontalAlign="Center">
                         <ItemTemplate>
                              <%#GetStatus(Eval("Status").ToString())%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Phê duyệt" HeaderStyle-HorizontalAlign="Center">
                         <ItemTemplate>
                              <%#Eval("Duyet")%>/<%#Eval("Tong") %>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="" HeaderStyle-HorizontalAlign="Center">
                         <ItemTemplate>
                           <a href='CommentDoc.aspx?Id=<%#Eval("docId")%>' onmouseover="Tip('XEM CHI TIẾT ĐÁNH GIÁ TÀI LIỆU')" onmouseout='UnTip()'>Xem đánh giá</a>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle  HorizontalAlign="Center" Width="120px"  CssClass="Grid_Row" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="Gridpager" HorizontalAlign="Center" />
                <AlternatingRowStyle CssClass="Grid_alternative"  />
                <SelectedRowStyle CssClass="Grid_Row"/>
            </asp:GridView>
           
        </div>
    </fieldset>
</asp:Panel>
</div>
</asp:Content>

